Telegram Bot
A step-by-step guide on how to integrate Ammer Pay to your Telegram web-shop.
Quickstart
This guide will show you step-by-step how to setup a shop with Ammer Pay as a payment acquiring method in Telegram, or connect your existing shop to Ammer Pay.
In this guide we assume you have already created an account with Ammer Pay via the Merchant Hub. Our official website: Official web site
(Optional) Step 1: Create a bot for your shop
This step is not required if you already have a bot.
- Open a chat with @BotFather (the "superbot" which orchestrates other bots in Telegram)
- Create a new bot using the menu function
- Copy the API Key generated by @BotFather for this bot and save it somewhere (This is called the "Bot Token"
Step 2: Create the Telegram Sales channel in the Merchant Hub
- Inside @BotFather, get a list of all your bots (/mybots command)
- Click on the bot you want to connect to Ammer Pay (usually the bot from step 1 of this guide)
- Click on the Payments button
- Choose "Ammer Pay" from the list of providers and click on it
- Choose "Connect Ammer Pay Live"
- You will have a chat open with the "Ammer Pay" bot, please disregard it and go back to your chat with @BotFather where you should see the connected payment methods for your bot and the corresponding API Key, please copy it as well as you will need it (This is called the "Gateway Secret")
Step 3: Configure your Telegram Sales Channel in the Merchant Hub
You should see this screen when configuring the Telegram Sales Channel:
Description
- Should be selected to Telegram Bot
- The Ammer Card number to which payments made by customers via the bot will be collected
- A friendly name (only used and visible in the Merchant Hub) for this sales channel
- If you are using an existing bot and just want payment processing functionality this is not required. If you are creating a new shop bot, then this is the item list for your shop.
- Copy-paste the "Bot Token" from Step 1 (if this is an existing bot, please ignore this)
- Copy-paste the "Gateway Secret" from Step 2.
- & 8. These settings are only required if you are creating a new shop, they are essentially the texts and buttons shown to users
(Optional) Step 4: Configure the links inside the Telegram Bot
If you created a new Telegram shop, then you probably want the menu button to open the shop URL in the WebApp screen that is rendered by Telegram. To achieve this you will need to copy the URL which is marked in section 8 as the “WebApp” type and you should copy the “URL Data” field contents.
At this point you should open @BotFather, choose the bot you are using the host your shop, and click on the “Menu Button” option. Press the “Configure Menu button” option and the send the bot the URL you copied earlier.
At this point when you click menu your shop should be opened in the embedded Telegram browser.